package intjavatorpedo.server;

import java.io.File;

import javax.xml.ws.Endpoint;

public class Server {
	public static void main(String[] args) {
		if (args.length != 2) {
			System.out.println("Usage: java Server wsEndpointURL storeXMLFileName");
			return;
		}
		String endpointUrl = args[0];
		String storeXMLFileName = args[1];
		
		File file = new File(storeXMLFileName);
		TorpedoImpl impl = new TorpedoImpl(file);
		
		Endpoint.publish(endpointUrl, impl);
		
		System.out.println(endpointUrl);
	}
}
